3.14.28 \(\int \frac {(c (d \tan (e+f x))^p)^n}{(a+b \tan (e+f x))^2} \, dx\) [1328]

3.14.28.1 Optimal result
3.14.28.2 Mathematica [A] (verified)
3.14.28.3 Rubi [A] (verified)
3.14.28.4 Maple [F]
3.14.28.5 Fricas [F]
3.14.28.6 Sympy [F]
3.14.28.7 Maxima [F]
3.14.28.8 Giac [F]
3.14.28.9 Mupad [F(-1)]

3.14.28.1 Optimal result

Integrand size = 27, antiderivative size = 293 \[ \int \frac {\left (c (d \tan (e+f x))^p\right )^n}{(a+b \tan (e+f x))^2} \, dx=\frac {\left (a^2-b^2\right ) \operatorname {Hypergeometric2F1}\left (1,\frac {1}{2} (1+n p),\frac {1}{2} (3+n p),-\tan ^2(e+f x)\right ) \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n}{\left (a^2+b^2\right )^2 f (1+n p)}+\frac {2 b^2 \operatorname {Hypergeometric2F1}\left (1,1+n p,2+n p,-\frac {b \tan (e+f x)}{a}\right ) \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n}{\left (a^2+b^2\right )^2 f (1+n p)}+\frac {b^2 \operatorname {Hypergeometric2F1}\left (2,1+n p,2+n p,-\frac {b \tan (e+f x)}{a}\right ) \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n}{a^2 \left (a^2+b^2\right ) f (1+n p)}-\frac {2 a b \operatorname {Hypergeometric2F1}\left (1,\frac {1}{2} (2+n p),\frac {1}{2} (4+n p),-\tan ^2(e+f x)\right ) \tan ^2(e+f x) \left (c (d \tan (e+f x))^p\right )^n}{\left (a^2+b^2\right )^2 f (2+n p)} \]

output
(a^2-b^2)*hypergeom([1, 1/2*n*p+1/2],[1/2*n*p+3/2],-tan(f*x+e)^2)*tan(f*x+ 
e)*(c*(d*tan(f*x+e))^p)^n/(a^2+b^2)^2/f/(n*p+1)+2*b^2*hypergeom([1, n*p+1] 
,[n*p+2],-b*tan(f*x+e)/a)*tan(f*x+e)*(c*(d*tan(f*x+e))^p)^n/(a^2+b^2)^2/f/ 
(n*p+1)+b^2*hypergeom([2, n*p+1],[n*p+2],-b*tan(f*x+e)/a)*tan(f*x+e)*(c*(d 
*tan(f*x+e))^p)^n/a^2/(a^2+b^2)/f/(n*p+1)-2*a*b*hypergeom([1, 1/2*n*p+1],[ 
1/2*n*p+2],-tan(f*x+e)^2)*tan(f*x+e)^2*(c*(d*tan(f*x+e))^p)^n/(a^2+b^2)^2/ 
f/(n*p+2)
 
3.14.28.2 Mathematica [A] (verified)

Time = 2.07 (sec) , antiderivative size = 231, normalized size of antiderivative = 0.79 \[ \int \frac {\left (c (d \tan (e+f x))^p\right )^n}{(a+b \tan (e+f x))^2} \, dx=\frac {\tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n \left (-\frac {b^2 \left (b^2 n p+a^2 (-2+n p)\right ) \operatorname {Hypergeometric2F1}\left (1,1+n p,2+n p,-\frac {b \tan (e+f x)}{a}\right )}{a \left (a^2+b^2\right ) (1+n p)}+\frac {b^2}{a+b \tan (e+f x)}+\frac {a \left (\left (a^2-b^2\right ) (2+n p) \operatorname {Hypergeometric2F1}\left (1,\frac {1}{2} (1+n p),\frac {1}{2} (3+n p),-\tan ^2(e+f x)\right )-2 a b (1+n p) \operatorname {Hypergeometric2F1}\left (1,1+\frac {n p}{2},2+\frac {n p}{2},-\tan ^2(e+f x)\right ) \tan (e+f x)\right )}{\left (a^2+b^2\right ) (1+n p) (2+n p)}\right )}{a \left (a^2+b^2\right ) f} \]

input
Integrate[(c*(d*Tan[e + f*x])^p)^n/(a + b*Tan[e + f*x])^2,x]
 
output
(Tan[e + f*x]*(c*(d*Tan[e + f*x])^p)^n*(-((b^2*(b^2*n*p + a^2*(-2 + n*p))* 
Hypergeometric2F1[1, 1 + n*p, 2 + n*p, -((b*Tan[e + f*x])/a)])/(a*(a^2 + b 
^2)*(1 + n*p))) + b^2/(a + b*Tan[e + f*x]) + (a*((a^2 - b^2)*(2 + n*p)*Hyp 
ergeometric2F1[1, (1 + n*p)/2, (3 + n*p)/2, -Tan[e + f*x]^2] - 2*a*b*(1 + 
n*p)*Hypergeometric2F1[1, 1 + (n*p)/2, 2 + (n*p)/2, -Tan[e + f*x]^2]*Tan[e 
 + f*x]))/((a^2 + b^2)*(1 + n*p)*(2 + n*p))))/(a*(a^2 + b^2)*f)
 
3.14.28.3 Rubi [A] (verified)

Time = 0.50 (sec) , antiderivative size = 276, normalized size of antiderivative = 0.94, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {3042, 4853, 2042, 615, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\left (c (d \tan (e+f x))^p\right )^n}{(a+b \tan (e+f x))^2} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\left (c (d \tan (e+f x))^p\right )^n}{(a+b \tan (e+f x))^2}dx\)

\(\Big \downarrow \) 4853

\(\displaystyle \frac {\int \frac {\left (c (d \tan (e+f x))^p\right )^n}{(a+b \tan (e+f x))^2 \left (\tan ^2(e+f x)+1\right )}d\tan (e+f x)}{f}\)

\(\Big \downarrow \) 2042

\(\displaystyle \frac {\tan ^{-n p}(e+f x) \left (c (d \tan (e+f x))^p\right )^n \int \frac {\tan ^{n p}(e+f x)}{(a+b \tan (e+f x))^2 \left (\tan ^2(e+f x)+1\right )}d\tan (e+f x)}{f}\)

\(\Big \downarrow \) 615

\(\displaystyle \frac {\tan ^{-n p}(e+f x) \left (c (d \tan (e+f x))^p\right )^n \int \left (\frac {2 a b^2 \tan ^{n p}(e+f x)}{\left (a^2+b^2\right )^2 (a+b \tan (e+f x))}+\frac {\left (a^2-2 b \tan (e+f x) a-b^2\right ) \tan ^{n p}(e+f x)}{\left (a^2+b^2\right )^2 \left (\tan ^2(e+f x)+1\right )}+\frac {b^2 \tan ^{n p}(e+f x)}{\left (a^2+b^2\right ) (a+b \tan (e+f x))^2}\right )d\tan (e+f x)}{f}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\tan ^{-n p}(e+f x) \left (c (d \tan (e+f x))^p\right )^n \left (\frac {2 b^2 \tan ^{n p+1}(e+f x) \operatorname {Hypergeometric2F1}\left (1,n p+1,n p+2,-\frac {b \tan (e+f x)}{a}\right )}{\left (a^2+b^2\right )^2 (n p+1)}+\frac {b^2 \tan ^{n p+1}(e+f x) \operatorname {Hypergeometric2F1}\left (2,n p+1,n p+2,-\frac {b \tan (e+f x)}{a}\right )}{a^2 \left (a^2+b^2\right ) (n p+1)}+\frac {\left (a^2-b^2\right ) \tan ^{n p+1}(e+f x) \operatorname {Hypergeometric2F1}\left (1,\frac {1}{2} (n p+1),\frac {1}{2} (n p+3),-\tan ^2(e+f x)\right )}{\left (a^2+b^2\right )^2 (n p+1)}-\frac {2 a b \tan ^{n p+2}(e+f x) \operatorname {Hypergeometric2F1}\left (1,\frac {1}{2} (n p+2),\frac {1}{2} (n p+4),-\tan ^2(e+f x)\right )}{\left (a^2+b^2\right )^2 (n p+2)}\right )}{f}\)

input
Int[(c*(d*Tan[e + f*x])^p)^n/(a + b*Tan[e + f*x])^2,x]
 
output
((c*(d*Tan[e + f*x])^p)^n*(((a^2 - b^2)*Hypergeometric2F1[1, (1 + n*p)/2, 
(3 + n*p)/2, -Tan[e + f*x]^2]*Tan[e + f*x]^(1 + n*p))/((a^2 + b^2)^2*(1 + 
n*p)) + (2*b^2*Hypergeometric2F1[1, 1 + n*p, 2 + n*p, -((b*Tan[e + f*x])/a 
)]*Tan[e + f*x]^(1 + n*p))/((a^2 + b^2)^2*(1 + n*p)) + (b^2*Hypergeometric 
2F1[2, 1 + n*p, 2 + n*p, -((b*Tan[e + f*x])/a)]*Tan[e + f*x]^(1 + n*p))/(a 
^2*(a^2 + b^2)*(1 + n*p)) - (2*a*b*Hypergeometric2F1[1, (2 + n*p)/2, (4 + 
n*p)/2, -Tan[e + f*x]^2]*Tan[e + f*x]^(2 + n*p))/((a^2 + b^2)^2*(2 + n*p)) 
))/(f*Tan[e + f*x]^(n*p))
 

3.14.28.3.1 Defintions of rubi rules used

rule 615
Int[((e_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2)^(p_), 
 x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*(c + d*x)^n*(a + b*x^2)^p, x], x] 
 /; FreeQ[{a, b, c, d, e, m, n}, x] && ILtQ[p, 0]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2042
Int[(u_.)*((c_.)*((d_)*((a_.) + (b_.)*(x_)))^(q_))^(p_), x_Symbol] :> Simp[ 
(c*(d*(a + b*x))^q)^p/(a + b*x)^(p*q)   Int[u*(a + b*x)^(p*q), x], x] /; Fr 
eeQ[{a, b, c, d, q, p}, x] &&  !IntegerQ[q] &&  !IntegerQ[p]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4853
Int[u_, x_Symbol] :> With[{v = FunctionOfTrig[u, x]}, Simp[With[{d = FreeFa 
ctors[Tan[v], x]}, d/Coefficient[v, x, 1]   Subst[Int[SubstFor[1/(1 + d^2*x 
^2), Tan[v]/d, u, x], x], x, Tan[v]/d]], x] /;  !FalseQ[v] && FunctionOfQ[N 
onfreeFactors[Tan[v], x], u, x, True] && TryPureTanSubst[ActivateTrig[u], x 
]]
 
3.14.28.4 Maple [F]

\[\int \frac {\left (c \left (d \tan \left (f x +e \right )\right )^{p}\right )^{n}}{\left (a +b \tan \left (f x +e \right )\right )^{2}}d x\]

input
int((c*(d*tan(f*x+e))^p)^n/(a+b*tan(f*x+e))^2,x)
 
output
int((c*(d*tan(f*x+e))^p)^n/(a+b*tan(f*x+e))^2,x)
 
3.14.28.5 Fricas [F]

\[ \int \frac {\left (c (d \tan (e+f x))^p\right )^n}{(a+b \tan (e+f x))^2} \, dx=\int { \frac {\left (\left (d \tan \left (f x + e\right )\right )^{p} c\right )^{n}}{{\left (b \tan \left (f x + e\right ) + a\right )}^{2}} \,d x } \]

input
integrate((c*(d*tan(f*x+e))^p)^n/(a+b*tan(f*x+e))^2,x, algorithm="fricas")
 
output
integral(((d*tan(f*x + e))^p*c)^n/(b^2*tan(f*x + e)^2 + 2*a*b*tan(f*x + e) 
 + a^2), x)
 
3.14.28.6 Sympy [F]

\[ \int \frac {\left (c (d \tan (e+f x))^p\right )^n}{(a+b \tan (e+f x))^2} \, dx=\int \frac {\left (c \left (d \tan {\left (e + f x \right )}\right )^{p}\right )^{n}}{\left (a + b \tan {\left (e + f x \right )}\right )^{2}}\, dx \]

input
integrate((c*(d*tan(f*x+e))**p)**n/(a+b*tan(f*x+e))**2,x)
 
output
Integral((c*(d*tan(e + f*x))**p)**n/(a + b*tan(e + f*x))**2, x)
 
3.14.28.7 Maxima [F]

\[ \int \frac {\left (c (d \tan (e+f x))^p\right )^n}{(a+b \tan (e+f x))^2} \, dx=\int { \frac {\left (\left (d \tan \left (f x + e\right )\right )^{p} c\right )^{n}}{{\left (b \tan \left (f x + e\right ) + a\right )}^{2}} \,d x } \]

input
integrate((c*(d*tan(f*x+e))^p)^n/(a+b*tan(f*x+e))^2,x, algorithm="maxima")
 
output
integrate(((d*tan(f*x + e))^p*c)^n/(b*tan(f*x + e) + a)^2, x)
 
3.14.28.8 Giac [F]

\[ \int \frac {\left (c (d \tan (e+f x))^p\right )^n}{(a+b \tan (e+f x))^2} \, dx=\int { \frac {\left (\left (d \tan \left (f x + e\right )\right )^{p} c\right )^{n}}{{\left (b \tan \left (f x + e\right ) + a\right )}^{2}} \,d x } \]

input
integrate((c*(d*tan(f*x+e))^p)^n/(a+b*tan(f*x+e))^2,x, algorithm="giac")
 
output
integrate(((d*tan(f*x + e))^p*c)^n/(b*tan(f*x + e) + a)^2, x)
 
3.14.28.9 Mupad [F(-1)]

Timed out. \[ \int \frac {\left (c (d \tan (e+f x))^p\right )^n}{(a+b \tan (e+f x))^2} \, dx=\int \frac {{\left (c\,{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^p\right )}^n}{{\left (a+b\,\mathrm {tan}\left (e+f\,x\right )\right )}^2} \,d x \]

input
int((c*(d*tan(e + f*x))^p)^n/(a + b*tan(e + f*x))^2,x)
 
output
int((c*(d*tan(e + f*x))^p)^n/(a + b*tan(e + f*x))^2, x)